﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LuDo.PitEditor
{
    public partial class LinkBuilder : Form
    {
        public string URL { get; private set; }
        public string TargetLink { get; private set; }

        public LinkBuilder()
        {
            InitializeComponent();
        }

        private void LinkBuilder_Load(object sender, EventArgs e)
        {
            txtURL.Focus();
        }

        private void btnHttp_Click(object sender, EventArgs e)
        {
            txtURL.Text = "http://";
            txtURL.Focus();
            txtURL.Select(txtURL.Text.Length, 0);
        }

        private void btnHttpwww_Click(object sender, EventArgs e)
        {
            txtURL.Text = "http://www.";
            txtURL.Focus();
            txtURL.Select(txtURL.Text.Length, 0);
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            this.URL = txtURL.Text;
            this.TargetLink = rbSamePage.Checked ? "_self" : "_blank";
        }
    }
}
